<% content_for :javascript do %>
<%= javascript_include_tag 'dcmgr_gui/storage_node_panel.js' %>
<script type="text/javascript">
jQuery(function($){
	dcmgrGUI.storageNodePanel();
});
</script>
<% end %>
<div id="mainarea_wide">
	<h3><img src="images/icon_resource.gif" /><%= t("storage_nodes.header") %><a href="javascript:void(0);" class="showhide"></a></h3>
 <div id="list_load_mask" class="maincontent">
	 	<div class="controller clearfix">
     	<a href="javascript:void(0);" class="refresh" style="margin-left:585px"><%= t("button.refresh") %></a>
   	</div>
 		<div class="controller clearfix">
         <div id="pagenate" class="r_float">
			  	<a href="javascript:void(0);" class="prev"></a>
			  	<p id="viewPagenate"></p>
			  	<a href="javascript:void(0);" class="next"></a>
         </div>
		</div>
		<div id="display_storage_nodes" class="display_area">
			<% content_for :javascript_template do %>
			<script id="storageNodesListTemplate" type="text/x-jquery-tmpl">
			 <table class="ptn01" frame="void" cellpadding="0" cellspacing="0" border="0">
			   <tr>
			     <th></th>
			     <th style="width:150px"><%= t("storage_nodes.list.storage_node_id") %></th>
					 <th><%= t("storage_nodes.list.disk_space") %></th>
				   <th><%= t("storage_nodes.list.ip") %></th>
					 <th><%= t("storage_nodes.list.status") %></th>
			   </tr>
			   {{each(index,item) rows}}
					<tr>
						{{if item.uuid }}
							<td class="listcheckbox"><input type="checkbox" value="${item.uuid}" > </td>
						{{else}}
						<td class="listcheckbox"></td>
						{{/if}}
						<td class="vtip" title="uuid">${item.uuid}</td>
						<td class="vtip center" title="offering_disk_space">${displayDiskSize(this.offering_disk_space_mb, 'MB')}</td>
						<td class="vtip center" title="ipaddr">${item.ipaddr}</td>
						<td class="vtip center state" title="status" style="width:50px">${item.status}</td>
					</tr>	
			   {{/each}}
			   </table>
			</script>
			<% end %>
		</div>
	</div>
	<div id="btm_maincontent_wide"></div>
	<h3><img src="images/icon_ttl_detail.gif" />Details<a href="javascript:void(0);" class="showhide"></a></h3>
	<div id="detail" class="maincontent">
		<% content_for :javascript_template do %>
		<script id="storageNodesDetailTemplate" type="text/x-jquery-tmpl">
		<div id="${item.uuid}" class="display_area">
			<h4 class="ptn01"><%= t("storage_nodes.details.sub_header") %>: <span class="uuid">${item.uuid}</span></h4>
			<table class="ptn02" frame="void" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.storage_node_id") %>:</td>
					<td>${item.uuid}</td>
				</tr>
				<tr>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.ip") %>:</td>
					<td>${item.ipaddr}</td>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.disk_space") %>:</td>
					<td>${displayDiskSize(this.offering_disk_space_mb, 'MB')}</td>
				</tr>
				<tr>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.status") %>:</td>
					<td class="state">${item.status}</td>
				</tr>
				<tr>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.created_at") %>:</td>
					<td colspan="7">${item.created_at}</td>
				</tr>
				<tr>
					<td class="padcell"></td>
					<td class="title"><%= t("storage_nodes.details.updated_at") %>:</td>
					<td colspan="7">${item.updated_at}</td>
				</tr>
			</table>
		</div>
		</script>
		<% end %>
	</div><!-- maincontent -->
	<div id="btm_maincontent_wide_last"></div>
</div><!-- mainarea_wide -->
